package com.kfm.pm;

public class TestSwimming {

    public static void main(String[] args) {
        Swimming s1 = new Swimming() {
            @Override
            public void swim() {
                System.out.println("狗刨式");
            }
        };

        Swimming s2 = new Swimming() {
            @Override
            public void swim() {
                System.out.println("淹死都是会游泳的！");
            }
        };
        startSwim(s1);
        startSwim(s2);
    }

    public static void startSwim(Swimming swimming) {
        swimming.swim();
    }
}
